//2009/09/03 00:53:00
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class NumberGuesser
{
public:
    int guess(string leftOver)
    {
		int ret = 0;
		for(int i=0; i<leftOver.size(); i++)
			ret += leftOver[i] - '0';
		return 9 - (ret % 9);
    }
};
